package cn.iocoder.yudao.module.trade.order.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 交易订单项 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class TradeOrderItemBaseVO {

    // ========== 订单项基本信息 ==========

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long orderId;

    // ========== 产品基本信息 ==========

    @Schema(description = "产品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long spuId;

    @Schema(description = "产品 SPU 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
    private String spuName;

    @Schema(description = "产品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long skuId;

    @Schema(description = "产品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://exmaple.local/1.png")
    private String picUrl;

    @Schema(description = "购买数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer count;

    @Schema(description = "计量单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "件")
    private String unitName;

    @Schema(description = "计量数值", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer unitValue;

    // ========== 价格 + 支付基本信息 ==========

    @Schema(description = "销售金额（单）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer price;

    @Schema(description = "优惠金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer discountPrice;

    @Schema(description = "应付金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer payPrice;

    @Schema(description = "子订单分摊金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer orderPartPrice;

    @Schema(description = "分摊后子订单实付金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer orderDividePrice;

    // ========== 营销基本信息 ==========

    // TODO 芋艿：在捉摸一下

    // ========== 售后基本信息 ==========

    @Schema(description = "售后状态：10-申请中、20-卖家通过、30-待卖家收货、40-等待平台退款、50-完成、61-买家取消售后、62-卖家拒绝、63-卖家拒绝收货", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    private Integer afterSaleStatus;

    @Schema(description = "售后编号", example = "1")
    private Long afterSaleId;

    // ========== 点餐信息 ==========

    @Schema(description = "小票打印状态:0-未出单、1-已出单", example = "0")
    private Integer receiptStatus;

    @Schema(description = "点菜序列，0表示首次点菜，大于0表示加菜顺序", example = "0")
    private Integer sequence;

}
